#ifndef  __tempAd_h   
    #define __tempAd_h
//Hal
	//ad6
#define D_adChannel  0x00
//Const	
  //  #define D_shortValue 600      //短路
//    #define D_offValue   4000     //断路
		
		#define D_shortValue 2751     //短路
    #define D_offValue   100    //断路
 #define D_kettleValidTimer  30 //255s
    #define D_kettleCalmTimer   3  //3s  
    #define D_tempChangeTime 60 //s
    #define D_tempCalmTimer 2 //s
//Var
	#ifdef __tempAd_c 
	   bit bAdGs; //干烧
	   bit bAdGood;
		bit bAdShort ;
		bit bAdOff ;
		bit bKettleValid ;
        bit bHighTemp ;
		uint8_t  kettleValidTimer ;
		uint8_t kettleCalmTimer	;
		uint8_t curTemp , lastTemp, highTemp;   //lastTemp 最新温度
        uint8_t tempChangeTimer ;  //检测沸点，如果 30秒温度没上升，即是沸点。因为海拔升高，沸点下降。
        uint8_t tempCalmTimer;
		uint8_t holdAdOff;
		uint8_t holdAdShort;
		uint8_t holdAdGs;
		uint8_t bGengXinCurTemp;
		bit firstTemp;
	#else
	  extern 	bit firstTemp;
		extern uint8_t bGengXinCurTemp;
		extern uint8_t holdAdGs;
		extern  bit bAdGood;
	extern	uint8_t holdAdOff;
		extern uint8_t holdAdShort;
	extern bit bAdGs;
		extern bit  bAdShort ;
		extern bit  bAdOff ;
		extern bit  bKettleValid ;
        extern bit bHighTemp ;
		extern uint8_t	 kettleValidTimer ;
		extern uint8_t kettleCalmTimer	;
		extern uint8_t curTemp , lastTemp, highTemp ;
        extern uint8_t tempChangeTimer ;
        extern uint8_t tempCalmTimer;
	#endif

//Function
    void    adInit(void) ;  //好像没有这个函数
    void    getTemp(void)  ;


#endif